home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / Panorama3_d1.adf / ARexxMacros / PanToFC.rexx < prev    next >
OS/2 REXX Batch file  |  1993-02-20  |  2KB  |  77 lines

  1. /* Send a picture from Panorama to the FireCracker 24-bit display        */
  2. /*   using Art Department Professional                                   */
  3. /* by James M. Bardeen.                                                  */
  4. /* AdPro must be loaded and running in the background.                   */
  5. /* and a 24-bit picture must have been created and                       */
  6. /* must be still "held" in memory by Panorama.                           */
  7. /* You must have enough memory to run Panorama and ADPro simultaneously  */
  8. /* and store 2 copies of the 24-bit picture in RAM.                      */
  9.  
  10.  
  11. /* Do limited testing to see if ADPro is running */
  12. say
  13. if show(port, 'ADPro') = 0 then do
  14.   say "Can't find ADPro."
  15.   EXIT
  16. end
  17.  
  18. ADDRESS 'Panorama'
  19. say "Saving 24-bit pic to ram:pan.iff"
  20. fname = "ram:pan.iff"
  21. /* If you are short of RAM, change this to store pan.iff in a   */
  22. /*   directory on your hard drive.   */
  23. 'SaveIFF24 'fname
  24. err = RC
  25. if RC ~= 0 then do
  26.   say "Save failed."
  27.   EXIT
  28. end
  29. /*  Eliminate the following 2 commands if you have lots of memory  */
  30. 'KillPic'  /* Frees picture memory in Panorama  */
  31. 'HoldPic' /* Reenables hold pic in Panorama  */
  32.  
  33. say "Make ADPro do its stuff."
  34. 'SetBusyPointer'
  35.  
  36. ADDRESS 'ADPro'
  37. OPTIONS RESULTS
  38. 'PSTATUS UNLOCKED'
  39. 'LFORMAT UNIVERSAL'
  40. err = RC
  41. if err ~= 0 then do
  42.   'ADPRO_TO_FRONT'
  43.   OKAY1 "Unable to find UNIVERSAL loader"
  44. end
  45. if err=0 then do
  46.   'LOAD 'fname
  47.   err = RC
  48.   if err ~= 0 then do
  49.     'ADPRO_TO_FRONT'
  50.     OKAY1 "Unable to load IFF file "fname
  51.   end
  52. end
  53. if err=0 then do
  54.   'SFORMAT FC24'
  55.   err = RC
  56.   if err ~= 0 then do
  57.     'ADPRO_TO_FRONT'
  58.     OKAY1 "Can't find the Firecracker Saver"
  59.   end
  60. end
  61. if err=0 then do
  62.   'ADPRO_TO_FRONT'
  63.   'SAVE XXX RAW CLEAR CENTER IMAGE BOARD ON'
  64. /* See the ADPro manual for additional SAVE options  */
  65.   if RC ~= 0 then
  66.     OKAY1 "Save to Firecracker failed."
  67. end
  68. /* If you have a separate monitor for the Firecracker display  */
  69. /*    you may want to add an 'ADPRO_TO_BACK' command here   */
  70.  
  71. ADDRESS COMMAND
  72.   'delete < nil: > nil: 'fname
  73.  
  74. ADDRESS 'Panorama'
  75. say "Done."
  76. 'ClearPointer'
  77.